class MyCalendar {
    vector<pair<int,int>> booked;
public:
    bool book(int startTime, int endTime) {
        for(auto [l,r] : booked){
            if(l < endTime && startTime < r){
                return false;
            }
        }
        booked.emplace_back(startTime,endTime);
        return true;
    }
};

/**
 * Your MyCalendar object will be instantiated and called as such:
 * MyCalendar* obj = new MyCalendar();
 * bool param_1 = obj->book(startTime,endTime);
 */
